package controllers;

import dao.IUserDAO;

/**
 * Created by IntelliJ IDEA.
 * User: mikhail.krupitskiy
 * Date: 21.10.2010
 * Time: 19:59:08
 * To change this template use File | Settings | File Templates.
 */
public class Registration {
    private String loginField;
    private String passwordField;
    private IUserDAO        user1;

    public String getLoginField() {
        return loginField; 
    }

    public void setLoginField(String login) {
        this.loginField = login;
    }

    public String getPasswordField() {
        return passwordField;
    }

    public void setPasswordField(String password) {
        this.passwordField = password;
    }

    public void add() {
        user.addUser(loginField, passwordField);
    }

    public String addAndNavigate() {
        add();
        return MainMenu.USERS_PAGE;
    }

    public void setUser(IUserDAO user) {
        this.user = user;
    }
}
